﻿using MediatR;
using MediatRApp.Models;
using System.Collections.Generic;

namespace MediatRApp.Command.Request
{
    /// <summary>
    /// 创建用户请求
    /// </summary>
    public class CreateUserRequest : IRequest<int>
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }
    }

    /// <summary>
    /// 获取单个用户查询请求
    /// </summary>
    public class GetUserQuery : IRequest<UserInfo>
    {
        public int UserId { get; set; }
    }

    /// <summary>
    /// 获取所有用户查询
    /// </summary>
    public class GetAllUsersQuery : IRequest<List<UserInfo>>
    {
    }

    /// <summary>
    /// 用户创建事件
    /// </summary>
    public class UserCreatedEvent : INotification
    {
        public int UserId { get; set; }

        /// <summary>
        /// 用户名
        /// </summary>
        public string UserName { get; set; }

        /// <summary>
        /// 邮箱
        /// </summary>
        public string Email { get; set; }
    }
}
